'use strict';
var Model = require('../../../Base/server/controllers/Model');

var modelField = {};
modelField.Code = {
    type: String,
    trim: true,
    Name: '编码',
    IsUnique: true,
    IsEmpty: false
};

modelField.Name = {
    type: String,
    default:'',
    trim: true 
};

modelField.ErpID = {
    type: String,
    default: '',
    trim: true,
    Name: 'ErpID',
    IsUnique: true,
};

var newModel = new Model(modelField);
newModel.addIndex({Code: 1});
newModel.create('Org', '组织机构');
